# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
_luaver=5.2
pkgname=lua${_luaver}-penlight
pkgver=1.3.0
pkgrel=1
pkgdesc="Lua libraries for extended operations on tables, lists and strings"
url="https://github.com/lunarmodules/Penlight"
arch="noarch"
license="GPL"
depends="lua${_luaver}-filesystem"
makedepends="wget"
install=
subpackages="$pkgname-doc"
source="penlight-$pkgver.tar.gz::https://github.com/lunarmodules/Penlight/archive/$pkgver.tar.gz"

_builddir="$srcdir"/Penlight-$pkgver

build() {
	return 0
}

package() {
	cd "$_builddir"
	mkdir -p "$pkgdir"/usr/share/lua/$_luaver/ \
		"$pkgdir"/usr/share/doc/$pkgname
	cp -r lua/pl "$pkgdir"/usr/share/lua/$_luaver/ || return 1
	cp -r doc/* "$pkgdir"/usr/share/doc/$pkgname/ || return 1
	cp -r examples "$pkgdir"/usr/share/doc/$pkgname/ || return 1
}

sha512sums="d38764f25219646e0772ed2df50bb8c31bf2067b7676d841848735a5c9fd81d169b0972c4db46ad3ceb53849fa25ec2bae0c5e053c03533fb383afdd1e9d44f9  penlight-1.3.0.tar.gz"
